package com.mnt.gui.base.contorls.view;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.stage.Stage;

import com.mnt.gui.base.controller.BaseController;
import com.mnt.gui.base.util.FXMLLoaderTool;

/**
 * simple loading view
 * @author 2014-7-22 mnt.cico
 *
 */
public class SimpleLoadingDialogController extends BaseController {
	
	final private Stage parentStage;
	public SimpleLoadingDialogController(Stage parentStage) {
		FXMLLoaderTool.load(this);
		this.parentStage = parentStage;
	}
	
    @FXML
    private Label lblTitle;

    @FXML
    private Label lblContent;
    
    public void setContent(String content) {
    	lblContent.setText(content);
    }
    
    public void show() {
    	parentStage.showAndWait();
    }
    
    public void close() {
    	parentStage.close();
    }

}
